<template>
  <view class="loading" v-if="loading">
    <!-- <u-loading color="red" :show="loading" :size="70"></u-loading> -->
    <u-loading-page loading-text="loading..."></u-loading-page>
    <view class="" style="margin-top: 30upx"> {{ text }} </view>
  </view>
</template>

<script>
export default {
  props: {
    loading: {
      type: Boolean,
      default: false
    },
    text: {
      type: String,
      default: '正在加载...'
    }
  }
}
</script>

<style lang="scss" scoped>
.loading {
  position: fixed;
  width: 100vw;
  height: 100vh;
  left: 0;
  top: 0;
  z-index: 99;
  background: #fff;
  display: flex;

  align-content: center;
  justify-content: center;
  flex-direction: column;
  // width: 100vw;
  text-align: center;
}
</style>
